 <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>{$Think.config.site.title} - 商品编辑</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">

    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">
    <!-- <link href="{$Think.config.site.resource_url}css/animate.min.css" rel="stylesheet"> -->
    <link href="{$Think.config.site.resource_url}css/style.min.css?v=4.0.0" rel="stylesheet">
    <link href="{$Think.config.site.common_resource_url}js/chosen/chosen.css" rel="stylesheet" type="text/css"/>

</head>
<style>
#cate1_chosen,#cate2_chosen,#cate3_chosen{display: none;}
#listtable .fa{
    cursor:pointer;
    color:#1ab394;
    margin-right:1em;
}
.chosen-select{
	width: 100%;
}
.mr{margin-right: 20px;}
.text-primary{color: #1ab394}
a:hover{color: #1ab394 !important}

.spec,.spec:hover{background-color: #DBDBDB;  border-color: #DBDBDB;color: #333; padding: 6px 20px}
.specactive,.specactive:hover{    background-color: #1ab394;border-color: #1ab394;color: #FFF;}

.addspec,.addspec:hover{background-color: #DBDBDB;  border-color: #DBDBDB;color: #333; padding: 6px 20px}
.addspecbox{display: none;}

.inp{color: #333}
.inpbox{background-color: #DBDBDB !important; border-color: #DBDBDB !important;}

.upimginput{
	margin-top: 15px;
	background-color: #1ab394; 
	border-color: #1ab394;
	border-radius: 3px;
    width: 274px;
    height: 32px;
    text-align: center;
    position: relative;
    display: block;
}
.upimginput label{
	padding: 5px 10px;
    font-size: 12px;
    line-height: 2;
    color: #fff;
}
.upimginput input{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
    opacity: 0
}
#picture_box{
	width: 100%;
	background: #ccc;
	min-height: 400px;
	overflow: hidden;
}
#picture_box .picture{
	height: 200px;
	overflow: hidden;
	position: relative;
}
#picture_box .picture img{max-width: 100%; max-height: 100%;}

#picture_box .picture .dropbg{
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 5;
	display: none;
	background: #ccc;
	opacity: 0.7;
}
#picture_box .picture:hover .dropbg{display: block;}
#picture_box .picture .dropbg .delpictuer{
	position: absolute;
	width: 20px;
	height: 20px;
	top: 20px;
	right: 20px;
	z-index: 10;
	display: block;
	font-size: 20px;
	color: #f00;
	cursor: pointer;
}
</style>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
      <div class="row">
            <div class="col-sm-4">
                <div id="nestable-menu">
                    <button type="button" class="btn btn-primary btn-sm" onclick="javascript:history.back(-1);"><i class="fa fa-backward"></i> 返回</button>
                </div>
            </div>
      </div>
      <form method="post" class="form-horizontal">
      <div class="row">
      		<!-- 商品信息 -->
          	<div class="col-sm-12">
                <div class="float-e-margins">
                    <div class="ibox-title">
                        <h5>商户信息</h5>
                        <input type="hidden" name="user_id" value="{$info['id']}">
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">昵称:</label>
                                <div class="col-sm-6">
                                    <input id="nickname" name="nickname" class="form-control" type="text" value="{$info.nickname}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right">真实姓名:</label>
                                <div class="col-sm-6">
                                    <input id="realname" name="realname" class="form-control" type="text" value="{$info.realname}">
                                </div>
                            </div>
							<div class="form-group">
                                <label class="col-sm-2 control-label text-right">手机号:</label>
                                <div class="col-sm-6">
                                    <input id="username" name="username" class="form-control" type="text" value="{$info.username}">
                                </div>
                            </div>
							<div class="form-group">
                                <label class="col-sm-2 control-label text-right">商户名:</label>
                                <div class="col-sm-6">
                                    <input id="shop_name" name="shop_name" class="form-control" type="text" value="{$info.shop_name}">
                                </div>
                            </div>
							<div class="form-group">
                                <label class="col-sm-2 control-label text-right">店铺负责人:</label>
                                <div class="col-sm-6">
                                    <input id="shop_owner" name="shop_owner" class="form-control" type="text" value="{$info.shop_owner}">
                                </div>
                            </div>
							<div class="form-group">
                                <label class="col-sm-2 control-label text-right">详细地址:</label>
                                <div class="col-sm-6">
                                    <input id="address" name="shop_address" class="form-control" type="text" value="{$info.shop_address}">
                                </div>
                            </div>
							<div class="form-group">
								<label class="col-sm-2 control-label text-right"></label>
                                <div class="col-sm-6">
                                    <input class="btn btn-primary text-center" type="submit" value="更新">
                                </div>
                            </div>
							<div class="form-group"></div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- <div class="col-sm-6">
                <div class="float-e-margins">
                    <div class="ibox-title">
                        <h5>发票信息</h5>
                        <input type="hidden" name="user_id" value="{$info['id']}">
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                           <table class="table table-bordered">
								<tr>
									<th>发票类型</th>
									{eq name="$invoice.license_type" value="1"}
									<td>普通发票</td>
									{else/}
									<td>电子发票</td>
									{/eq}
								</tr>
								<tr>
									<th>发票抬头</th>
									<td>{$invoice.license_name}</td>
								</tr>
								<tr>
									<th>纳税人识别号</th>
									<td>{$invoice.id_number}</td>
								</tr>
								<tr>
									<th>注册地址</th>
									<td>{$invoice.address}</td>
								</tr>
								<tr>
									<th>注册电话</th>
									<td>{$invoice.phone}</td>
								</tr>
								<tr>
									<th>开户银行</th>
									<td>{$invoice.bank}</td>
								</tr>
								<tr>
									<th>银行帐号</th>
									<td>{$invoice.bank_account}</td>
								</tr>
								<tr>
									<th>开票时间</th>
									<td>{$invoice.time|strtotime|date='Y-m-d',###}</td>
								</tr>
								<tr>
									<th>首次开票起始日</th>
									<td>{$invoice.start_time|strtotime|date='Y-m-d',###}</td>
								</tr>
								<tr>
									<th>电子发票接受邮箱</th>
									<td>{$invoice.email}</td>
								</tr>
                            </table>
                        </div>
                    </div>
                </div>
            </div> -->
        </div>
      </form>
	  <p></p>
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
                        <h5>订单列表</h5>
                    </div>
					<div class="ibox-content">
						<div class="table-responsive">
                            <table class="table table-striped" id="listtable">
                                <thead>
                                    <tr>
                                        <th width="30"><input name="checkall" id="checkall"  type="checkbox" class="i-checks" value="1"></th>
                                        <th width="100">订单号</th>
                                        <th width="100">买家姓名</th>
                                        <th width="150">联系电话</th>
                                        <th width="150">买家地址</th>
                                        <th width="200">下单时间</th>
                                        <th width="200">支付时间</th>
                                        <th width="150">商品总价</th>
                                        <th width="150">订单总价</th>
                                        <th width="150">支付金额</th>
                                        <th width="150">订单运费</th>
                                        <th width="150">实付金额</th>
                                        <th width="150">退款金额</th>
                                    </tr>
                                </thead>
								{volist name="order" id="vo"}
                                <tbody>
										<tr class="goodsname" data-id="{$vo.order_id}">
											<td>
												<input name="ids[]"  type="checkbox" class="i-checks" value="{$vo.order_id}">
											</td>
											<td>{$vo.order_no}</td>
											<td>{$vo.user_name}</td>
											<td>{$vo.receiver_mobile}</td>
											<td>{$vo.receiver_address}</td>
											<td>{$vo.create_time}</td>
											<td>{$vo.pay_time}</td>
											<td><div class="sort">{$vo.goods_money}</div></td>
											<td>{$vo.order_money}</td>
											<td>{$vo.pay_money}</td>
											<td>{$vo.shipping_money}</td>
											<td>{$vo.pay_money}</td>
											<td>{$vo.refund_money}</td>
										</tr>
                                </tbody>
							   {/volist}
							    </tbody>
                            </table>
                        </div>
					</div>
				</div>
			</div>
		</div>
    </div>

    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/peity/jquery.peity.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/iCheck/icheck.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/majax.js"></script>
    <script src="{$Think.config.site.common_resource_url}js/jedit.js"></script>

    <script src="{$Think.config.site.resource_url}js/plugins/validate/jquery.validate.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/validate/messages_zh.min.js"></script>

    <script type="text/javascript" src="{$Think.config.site.common_resource_url}js/chosen/chosen.jquery.js"></script>

    <script type="text/javascript" src="{$Think.config.site.common_resource_url}js/dmuploader.min.js"></script>
    <script type="text/javascript" src="{$Think.config.site.common_resource_url}js/jquery-dragarrange.js"></script>


    <script type="text/javascript">
    	function save(){
			var fomrData = $("form").serialize();
			majax('{:url("edit")}',fomrData,function(d){
				if (d.code>0) {
					layer.msg(d.msg, {icon: 1});
				}else{
					layer.msg(d.msg, {icon: 5});
				}
			})
		};
		
		$(function() {
    		$("form").validate({
			  debug:false,
			  submitHandler:function(form){
		            save();   
		      }   
			});
    	});
    </script>
</body>

</html>
